Integrand size = 10, antiderivative size = 89 \[ \int \frac {1}{1-\cos ^8(x)} \, dx=\frac {x}{4 \sqrt {2}}-\frac {\arctan \left (\sqrt {1-i} \cot (x)\right )}{4 \sqrt {1-i}}-\frac {\arctan \left (\sqrt {1+i} \cot (x)\right )}{4 \sqrt {1+i}}-\frac {\arctan \left (\frac {\cos (x) \sin (x)}{1+\sqrt {2}+\cos ^2(x)}\right )}{4 \sqrt {2}}-\frac {\cot (x)}{4} \]
-1/4*cot(x)-1/4*arctan(cot(x)*(1-I)^(1/2))/(1-I)^(1/2)-1/4*arctan(cot(x)*( 1+I)^(1/2))/(1+I)^(1/2)+1/8*x*2^(1/2)-1/8*arctan(cos(x)*sin(x)/(1+cos(x)^2 +2^(1/2)))*2^(1/2)
Time = 5.08 (sec) , antiderivative size = 64, normalized size of antiderivative = 0.72 \[ \int \frac {1}{1-\cos ^8(x)} \, dx=\frac {1}{8} \left (\frac {2 \arctan \left (\frac {\tan (x)}{\sqrt {1-i}}\right )}{\sqrt {1-i}}+\frac {2 \arctan \left (\frac {\tan (x)}{\sqrt {1+i}}\right )}{\sqrt {1+i}}+\sqrt {2} \arctan \left (\frac {\tan (x)}{\sqrt {2}}\right )-2 \cot (x)\right ) \]
((2*ArcTan[Tan[x]/Sqrt[1 - I]])/Sqrt[1 - I] + (2*ArcTan[Tan[x]/Sqrt[1 + I] ])/Sqrt[1 + I] + Sqrt[2]*ArcTan[Tan[x]/Sqrt[2]] - 2*Cot[x])/8
Time = 0.43 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.78, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.900, Rules used = {3042, 3690, 3042, 3654, 3042, 3660, 216, 4254, 24}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {1}{1-\cos ^8(x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{1-\sin \left (x+\frac {\pi }{2}\right )^8}dx\) |
\(\Big \downarrow \) 3690 |
\(\displaystyle \frac {1}{4} \int \frac {1}{1-\cos ^2(x)}dx+\frac {1}{4} \int \frac {1}{1-i \cos ^2(x)}dx+\frac {1}{4} \int \frac {1}{i \cos ^2(x)+1}dx+\frac {1}{4} \int \frac {1}{\cos ^2(x)+1}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{4} \int \frac {1}{1-\sin \left (x+\frac {\pi }{2}\right )^2}dx+\frac {1}{4} \int \frac {1}{1-i \sin \left (x+\frac {\pi }{2}\right )^2}dx+\frac {1}{4} \int \frac {1}{i \sin \left (x+\frac {\pi }{2}\right )^2+1}dx+\frac {1}{4} \int \frac {1}{\sin \left (x+\frac {\pi }{2}\right )^2+1}dx\) |
\(\Big \downarrow \) 3654 |
\(\displaystyle \frac {1}{4} \int \frac {1}{1-i \sin \left (x+\frac {\pi }{2}\right )^2}dx+\frac {1}{4} \int \frac {1}{i \sin \left (x+\frac {\pi }{2}\right )^2+1}dx+\frac {1}{4} \int \frac {1}{\sin \left (x+\frac {\pi }{2}\right )^2+1}dx+\frac {1}{4} \int \csc ^2(x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{4} \int \frac {1}{1-i \sin \left (x+\frac {\pi }{2}\right )^2}dx+\frac {1}{4} \int \frac {1}{i \sin \left (x+\frac {\pi }{2}\right )^2+1}dx+\frac {1}{4} \int \frac {1}{\sin \left (x+\frac {\pi }{2}\right )^2+1}dx+\frac {1}{4} \int \csc (x)^2dx\) |
\(\Big \downarrow \) 3660 |
\(\displaystyle -\frac {1}{4} \int \frac {1}{(1-i) \cot ^2(x)+1}d\cot (x)-\frac {1}{4} \int \frac {1}{(1+i) \cot ^2(x)+1}d\cot (x)-\frac {1}{4} \int \frac {1}{2 \cot ^2(x)+1}d\cot (x)+\frac {1}{4} \int \csc (x)^2dx\) |
\(\Big \downarrow \) 216 |
\(\displaystyle \frac {1}{4} \int \csc (x)^2dx-\frac {\arctan \left (\sqrt {1-i} \cot (x)\right )}{4 \sqrt {1-i}}-\frac {\arctan \left (\sqrt {1+i} \cot (x)\right )}{4 \sqrt {1+i}}-\frac {\arctan \left (\sqrt {2} \cot (x)\right )}{4 \sqrt {2}}\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle -\frac {\int 1d\cot (x)}{4}-\frac {\arctan \left (\sqrt {1-i} \cot (x)\right )}{4 \sqrt {1-i}}-\frac {\arctan \left (\sqrt {1+i} \cot (x)\right )}{4 \sqrt {1+i}}-\frac {\arctan \left (\sqrt {2} \cot (x)\right )}{4 \sqrt {2}}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle -\frac {\arctan \left (\sqrt {1-i} \cot (x)\right )}{4 \sqrt {1-i}}-\frac {\arctan \left (\sqrt {1+i} \cot (x)\right )}{4 \sqrt {1+i}}-\frac {\arctan \left (\sqrt {2} \cot (x)\right )}{4 \sqrt {2}}-\frac {\cot (x)}{4}\) |
-1/4*ArcTan[Sqrt[1 - I]*Cot[x]]/Sqrt[1 - I] - ArcTan[Sqrt[1 + I]*Cot[x]]/( 4*Sqrt[1 + I]) - ArcTan[Sqrt[2]*Cot[x]]/(4*Sqrt[2]) - Cot[x]/4
3.1.85.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a , 0] || GtQ[b, 0])
Int[(u_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Simp[ a^p Int[ActivateTrig[u*cos[e + f*x]^(2*p)], x], x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0] && IntegerQ[p]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(-1), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[ff/f Subst[Int[1/(a + (a + b)*ff^2*x^ 2), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^(n_))^(-1), x_Symbol] :> Module[{ k}, Simp[2/(a*n) Sum[Int[1/(1 - Sin[e + f*x]^2/((-1)^(4*(k/n))*Rt[-a/b, n /2])), x], {k, 1, n/2}], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[n/2]
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 175 vs. \(2 (65 ) = 130\).
Time = 2.68 (sec) , antiderivative size = 176, normalized size of antiderivative = 1.98
method | result | size |
risch | \(-\frac {i}{2 \left ({\mathrm e}^{2 i x}-1\right )}+\frac {\sqrt {-2-2 i}\, \ln \left ({\mathrm e}^{2 i x}-i \sqrt {-2-2 i}+1+2 i+\sqrt {-2-2 i}\right )}{16}-\frac {\sqrt {-2-2 i}\, \ln \left ({\mathrm e}^{2 i x}+i \sqrt {-2-2 i}+1+2 i-\sqrt {-2-2 i}\right )}{16}+\frac {\sqrt {-2+2 i}\, \ln \left ({\mathrm e}^{2 i x}-i \sqrt {-2+2 i}-\sqrt {-2+2 i}+1-2 i\right )}{16}-\frac {\sqrt {-2+2 i}\, \ln \left ({\mathrm e}^{2 i x}+i \sqrt {-2+2 i}+\sqrt {-2+2 i}+1-2 i\right )}{16}+\frac {i \sqrt {2}\, \ln \left ({\mathrm e}^{2 i x}+2 \sqrt {2}+3\right )}{16}-\frac {i \sqrt {2}\, \ln \left ({\mathrm e}^{2 i x}-2 \sqrt {2}+3\right )}{16}\) | \(176\) |
default | \(-\frac {1}{4 \tan \left (x \right )}-\frac {\sqrt {2}\, \left (-\frac {\sqrt {-2+2 \sqrt {2}}\, \ln \left (\tan ^{2}\left (x \right )-\tan \left (x \right ) \sqrt {-2+2 \sqrt {2}}+\sqrt {2}\right )}{2}+\frac {2 \left (-1-\sqrt {2}\right ) \arctan \left (\frac {2 \tan \left (x \right )-\sqrt {-2+2 \sqrt {2}}}{\sqrt {2 \sqrt {2}+2}}\right )}{\sqrt {2 \sqrt {2}+2}}\right )}{16}-\frac {\sqrt {2}\, \left (\frac {\sqrt {-2+2 \sqrt {2}}\, \ln \left (\tan ^{2}\left (x \right )+\tan \left (x \right ) \sqrt {-2+2 \sqrt {2}}+\sqrt {2}\right )}{2}+\frac {2 \left (-1-\sqrt {2}\right ) \arctan \left (\frac {2 \tan \left (x \right )+\sqrt {-2+2 \sqrt {2}}}{\sqrt {2 \sqrt {2}+2}}\right )}{\sqrt {2 \sqrt {2}+2}}\right )}{16}+\frac {\arctan \left (\frac {\sqrt {2}\, \tan \left (x \right )}{2}\right ) \sqrt {2}}{8}\) | \(186\) |
-1/2*I/(exp(2*I*x)-1)+1/16*(-2-2*I)^(1/2)*ln(exp(2*I*x)-I*(-2-2*I)^(1/2)+1 +2*I+(-2-2*I)^(1/2))-1/16*(-2-2*I)^(1/2)*ln(exp(2*I*x)+I*(-2-2*I)^(1/2)+1+ 2*I-(-2-2*I)^(1/2))+1/16*(-2+2*I)^(1/2)*ln(exp(2*I*x)-I*(-2+2*I)^(1/2)-(-2 +2*I)^(1/2)+1-2*I)-1/16*(-2+2*I)^(1/2)*ln(exp(2*I*x)+I*(-2+2*I)^(1/2)+(-2+ 2*I)^(1/2)+1-2*I)+1/16*I*2^(1/2)*ln(exp(2*I*x)+2*2^(1/2)+3)-1/16*I*2^(1/2) *ln(exp(2*I*x)-2*2^(1/2)+3)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 166 vs. \(2 (57) = 114\).
Time = 0.29 (sec) , antiderivative size = 166, normalized size of antiderivative = 1.87 \[ \int \frac {1}{1-\cos ^8(x)} \, dx=\frac {\sqrt {2} \sqrt {i - 1} \log \left (-\left (i - 1\right ) \, \sqrt {2} \sqrt {i - 1} \cos \left (x\right ) \sin \left (x\right ) + \left (2 i - 1\right ) \, \cos \left (x\right )^{2} - i\right ) \sin \left (x\right ) - \sqrt {2} \sqrt {i - 1} \log \left (\left (i - 1\right ) \, \sqrt {2} \sqrt {i - 1} \cos \left (x\right ) \sin \left (x\right ) + \left (2 i - 1\right ) \, \cos \left (x\right )^{2} - i\right ) \sin \left (x\right ) - \sqrt {2} \sqrt {-i - 1} \log \left (\left (i + 1\right ) \, \sqrt {2} \sqrt {-i - 1} \cos \left (x\right ) \sin \left (x\right ) + \left (2 i + 1\right ) \, \cos \left (x\right )^{2} - i\right ) \sin \left (x\right ) + \sqrt {2} \sqrt {-i - 1} \log \left (-\left (i + 1\right ) \, \sqrt {2} \sqrt {-i - 1} \cos \left (x\right ) \sin \left (x\right ) + \left (2 i + 1\right ) \, \cos \left (x\right )^{2} - i\right ) \sin \left (x\right ) - 2 \, \sqrt {2} \arctan \left (\frac {3 \, \sqrt {2} \cos \left (x\right )^{2} - \sqrt {2}}{4 \, \cos \left (x\right ) \sin \left (x\right )}\right ) \sin \left (x\right ) - 8 \, \cos \left (x\right )}{32 \, \sin \left (x\right )} \]
1/32*(sqrt(2)*sqrt(I - 1)*log(-(I - 1)*sqrt(2)*sqrt(I - 1)*cos(x)*sin(x) + (2*I - 1)*cos(x)^2 - I)*sin(x) - sqrt(2)*sqrt(I - 1)*log((I - 1)*sqrt(2)* sqrt(I - 1)*cos(x)*sin(x) + (2*I - 1)*cos(x)^2 - I)*sin(x) - sqrt(2)*sqrt( -I - 1)*log((I + 1)*sqrt(2)*sqrt(-I - 1)*cos(x)*sin(x) + (2*I + 1)*cos(x)^ 2 - I)*sin(x) + sqrt(2)*sqrt(-I - 1)*log(-(I + 1)*sqrt(2)*sqrt(-I - 1)*cos (x)*sin(x) + (2*I + 1)*cos(x)^2 - I)*sin(x) - 2*sqrt(2)*arctan(1/4*(3*sqrt (2)*cos(x)^2 - sqrt(2))/(cos(x)*sin(x)))*sin(x) - 8*cos(x))/sin(x)
Timed out. \[ \int \frac {1}{1-\cos ^8(x)} \, dx=\text {Timed out} \]
\[ \int \frac {1}{1-\cos ^8(x)} \, dx=\int { -\frac {1}{\cos \left (x\right )^{8} - 1} \,d x } \]
1/8*((cos(2*x)^2 + sin(2*x)^2 - 2*cos(2*x) + 1)*arctan2(4*sqrt(2)*sin(2*x) /(2*(2*sqrt(2) + 3)*cos(2*x) + cos(2*x)^2 + sin(2*x)^2 + 12*sqrt(2) + 17), (cos(2*x)^2 + sin(2*x)^2 + 6*cos(2*x) + 1)/(2*(2*sqrt(2) + 3)*cos(2*x) + cos(2*x)^2 + sin(2*x)^2 + 12*sqrt(2) + 17)) + 64*(sqrt(2)*cos(2*x)^2 + sqr t(2)*sin(2*x)^2 - 2*sqrt(2)*cos(2*x) + sqrt(2))*integrate(((4*cos(2*x) + 1 )*cos(4*x) + cos(8*x)*cos(4*x) + 4*cos(6*x)*cos(4*x) + 22*cos(4*x)^2 + sin (8*x)*sin(4*x) + 4*sin(6*x)*sin(4*x) + 22*sin(4*x)^2 + 4*sin(4*x)*sin(2*x) )/(2*(4*cos(6*x) + 22*cos(4*x) + 4*cos(2*x) + 1)*cos(8*x) + cos(8*x)^2 + 8 *(22*cos(4*x) + 4*cos(2*x) + 1)*cos(6*x) + 16*cos(6*x)^2 + 44*(4*cos(2*x) + 1)*cos(4*x) + 484*cos(4*x)^2 + 16*cos(2*x)^2 + 4*(2*sin(6*x) + 11*sin(4* x) + 2*sin(2*x))*sin(8*x) + sin(8*x)^2 + 16*(11*sin(4*x) + 2*sin(2*x))*sin (6*x) + 16*sin(6*x)^2 + 484*sin(4*x)^2 + 176*sin(4*x)*sin(2*x) + 16*sin(2* x)^2 + 8*cos(2*x) + 1), x) - 4*sqrt(2)*sin(2*x))/(sqrt(2)*cos(2*x)^2 + sqr t(2)*sin(2*x)^2 - 2*sqrt(2)*cos(2*x) + sqrt(2))
Leaf count of result is larger than twice the leaf count of optimal. 222 vs. \(2 (57) = 114\).
Time = 0.54 (sec) , antiderivative size = 222, normalized size of antiderivative = 2.49 \[ \int \frac {1}{1-\cos ^8(x)} \, dx=\frac {1}{8} \, \sqrt {2} {\left (x + \arctan \left (-\frac {\sqrt {2} \sin \left (2 \, x\right ) - \sin \left (2 \, x\right )}{\sqrt {2} \cos \left (2 \, x\right ) + \sqrt {2} - \cos \left (2 \, x\right ) + 1}\right )\right )} + \frac {1}{8} \, {\left (\pi \left \lfloor \frac {x}{\pi } + \frac {1}{2} \right \rfloor + \arctan \left (\frac {2^{\frac {3}{4}} {\left (2^{\frac {1}{4}} \sqrt {-\sqrt {2} + 2} + 2 \, \tan \left (x\right )\right )}}{2 \, \sqrt {\sqrt {2} + 2}}\right )\right )} \sqrt {\sqrt {2} + 1} + \frac {1}{8} \, {\left (\pi \left \lfloor \frac {x}{\pi } + \frac {1}{2} \right \rfloor + \arctan \left (-\frac {2^{\frac {3}{4}} {\left (2^{\frac {1}{4}} \sqrt {-\sqrt {2} + 2} - 2 \, \tan \left (x\right )\right )}}{2 \, \sqrt {\sqrt {2} + 2}}\right )\right )} \sqrt {\sqrt {2} + 1} - \frac {1}{16} \, \sqrt {\sqrt {2} - 1} \log \left (\tan \left (x\right )^{2} + 2^{\frac {1}{4}} \sqrt {-\sqrt {2} + 2} \tan \left (x\right ) + \sqrt {2}\right ) + \frac {1}{16} \, \sqrt {\sqrt {2} - 1} \log \left (\tan \left (x\right )^{2} - 2^{\frac {1}{4}} \sqrt {-\sqrt {2} + 2} \tan \left (x\right ) + \sqrt {2}\right ) - \frac {1}{4 \, \tan \left (x\right )} \]
1/8*sqrt(2)*(x + arctan(-(sqrt(2)*sin(2*x) - sin(2*x))/(sqrt(2)*cos(2*x) + sqrt(2) - cos(2*x) + 1))) + 1/8*(pi*floor(x/pi + 1/2) + arctan(1/2*2^(3/4 )*(2^(1/4)*sqrt(-sqrt(2) + 2) + 2*tan(x))/sqrt(sqrt(2) + 2)))*sqrt(sqrt(2) + 1) + 1/8*(pi*floor(x/pi + 1/2) + arctan(-1/2*2^(3/4)*(2^(1/4)*sqrt(-sqr t(2) + 2) - 2*tan(x))/sqrt(sqrt(2) + 2)))*sqrt(sqrt(2) + 1) - 1/16*sqrt(sq rt(2) - 1)*log(tan(x)^2 + 2^(1/4)*sqrt(-sqrt(2) + 2)*tan(x) + sqrt(2)) + 1 /16*sqrt(sqrt(2) - 1)*log(tan(x)^2 - 2^(1/4)*sqrt(-sqrt(2) + 2)*tan(x) + s qrt(2)) - 1/4/tan(x)
Time = 2.91 (sec) , antiderivative size = 241, normalized size of antiderivative = 2.71 \[ \int \frac {1}{1-\cos ^8(x)} \, dx=\frac {\sqrt {2}\,\mathrm {atan}\left (\frac {\sqrt {2}\,\mathrm {tan}\left (x\right )}{2}\right )}{8}-\mathrm {atan}\left (\frac {\sqrt {2}\,\mathrm {tan}\left (x\right )\,\sqrt {-\frac {\sqrt {2}}{256}-\frac {1}{256}}\,1{}\mathrm {i}}{2\,\left (16\,\sqrt {\frac {\sqrt {2}}{256}-\frac {1}{256}}\,\sqrt {-\frac {\sqrt {2}}{256}-\frac {1}{256}}-\frac {1}{16}\right )}+\frac {\sqrt {2}\,\mathrm {tan}\left (x\right )\,\sqrt {\frac {\sqrt {2}}{256}-\frac {1}{256}}\,1{}\mathrm {i}}{2\,\left (16\,\sqrt {\frac {\sqrt {2}}{256}-\frac {1}{256}}\,\sqrt {-\frac {\sqrt {2}}{256}-\frac {1}{256}}-\frac {1}{16}\right )}\right )\,\left (\sqrt {-\frac {\sqrt {2}}{256}-\frac {1}{256}}\,2{}\mathrm {i}-\sqrt {\frac {\sqrt {2}}{256}-\frac {1}{256}}\,2{}\mathrm {i}\right )+\mathrm {atan}\left (\frac {\sqrt {2}\,\mathrm {tan}\left (x\right )\,\sqrt {-\frac {\sqrt {2}}{256}-\frac {1}{256}}\,1{}\mathrm {i}}{2\,\left (16\,\sqrt {\frac {\sqrt {2}}{256}-\frac {1}{256}}\,\sqrt {-\frac {\sqrt {2}}{256}-\frac {1}{256}}+\frac {1}{16}\right )}-\frac {\sqrt {2}\,\mathrm {tan}\left (x\right )\,\sqrt {\frac {\sqrt {2}}{256}-\frac {1}{256}}\,1{}\mathrm {i}}{2\,\left (16\,\sqrt {\frac {\sqrt {2}}{256}-\frac {1}{256}}\,\sqrt {-\frac {\sqrt {2}}{256}-\frac {1}{256}}+\frac {1}{16}\right )}\right )\,\left (\sqrt {-\frac {\sqrt {2}}{256}-\frac {1}{256}}\,2{}\mathrm {i}+\sqrt {\frac {\sqrt {2}}{256}-\frac {1}{256}}\,2{}\mathrm {i}\right )-\frac {1}{4\,\mathrm {tan}\left (x\right )} \]
atan((2^(1/2)*tan(x)*(- 2^(1/2)/256 - 1/256)^(1/2)*1i)/(2*(16*(2^(1/2)/256 - 1/256)^(1/2)*(- 2^(1/2)/256 - 1/256)^(1/2) + 1/16)) - (2^(1/2)*tan(x)*( 2^(1/2)/256 - 1/256)^(1/2)*1i)/(2*(16*(2^(1/2)/256 - 1/256)^(1/2)*(- 2^(1/ 2)/256 - 1/256)^(1/2) + 1/16)))*((- 2^(1/2)/256 - 1/256)^(1/2)*2i + (2^(1/ 2)/256 - 1/256)^(1/2)*2i) - atan((2^(1/2)*tan(x)*(- 2^(1/2)/256 - 1/256)^( 1/2)*1i)/(2*(16*(2^(1/2)/256 - 1/256)^(1/2)*(- 2^(1/2)/256 - 1/256)^(1/2) - 1/16)) + (2^(1/2)*tan(x)*(2^(1/2)/256 - 1/256)^(1/2)*1i)/(2*(16*(2^(1/2) /256 - 1/256)^(1/2)*(- 2^(1/2)/256 - 1/256)^(1/2) - 1/16)))*((- 2^(1/2)/25 6 - 1/256)^(1/2)*2i - (2^(1/2)/256 - 1/256)^(1/2)*2i) - 1/(4*tan(x)) + (2^ (1/2)*atan((2^(1/2)*tan(x))/2))/8